//
//  KLGesturePwdViewController.m
//  KISSLOCK
//
//  Created by 华杨科技 on 2017/4/25.
//  Copyright © 2017年 陈宾鹏. All rights reserved.
//
//  手势密码界面

#import "KLGesturePwdViewController.h"
#import "RBGesturePwdView.h"
#import "KLHelp.h"
#import "RBPwdHeader.h"

@interface KLGesturePwdViewController ()

@end

@implementation KLGesturePwdViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setNavAndSubViews];
}
- (void)setNavAndSubViews {
    
    RBGesturePwdView *pwdView = [[RBGesturePwdView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:pwdView];
    
    // 初始化iconView
    [pwdView setIconWithImgStr:@"手持身份证上传.png" name:@"哈哈哈😁" reminder:ModifyPWD];
    
    // 忘记手势密码button
    [pwdView forgetGesturePwdBlock:^(UIButton *btn) {
        [btn addTarget:self action:@selector(forgetGestureBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
    }];
    
    
    // 设置左边返回按钮
    UIButton *backButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [backButton setImage:[UIImage imageNamed:@"返回"] forState:(UIControlStateNormal)];
    [backButton setBackgroundColor:[UIColor clearColor]];
    
    backButton.frame = CGRectMake(0, 10, 64, 64);
    [self.view addSubview:backButton];
    [backButton addTarget:self action:@selector(doBack:) forControlEvents:(UIControlEventTouchUpInside)];
}

- (void)doBack:(UIButton *)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)forgetGestureBtnAction:(UIButton *)sender {
    NSLog(@"点击了忘记手势密码button");
}


@end
